import java.util.Scanner;

public class test {
    public static void main1(String[] args) {
        int count=0;
        for (int i = 1; i <100 ; i++) {
            if(i%10==9) {
                count++;
            }if (i/10==9){
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main2(String[] args) {
        double sum=0.0;
        int flg=1;
        for (int i = 1; i <100 ; i++) {
            sum=sum+1.0/i*flg;
            flg=-flg;
        }
        System.out.println(sum);
    }
//模拟登录
    public static void main5(String[] args) {
        login();
    }
        public  static void login(){
            int count=3;
            while(count!=0){
            Scanner scanner=new Scanner(System.in);
            System.out.println("请输入你的密码：");
            String password=scanner.nextLine();
            if(password.equals("123456")){
                System.out.println("登录成功了！");
                break;
            }else{
                count--;
                System.out.println("你密码错了，你还有 "+count+"次机会");
            }
        }
    }
//水仙花数
    public static void findNum(int n) {
        for (int i = 1; i < n; i++) {
            int tmp=i;
            int count=0;
            while(tmp!=0){
                count++;
                tmp/=10;
            }
            tmp=i;
            int sum=0;
            while(tmp!=0){
                sum+=Math.pow(tmp%10,count);
                tmp/=10;
            }
            if (sum==i){
                System.out.println(i);
            }
        }
    }

    public static void main4(String[] args) {
    Scanner scanner=new Scanner(System.in);
    int n=scanner.nextInt();
    findNum(n);
    }

    public static int numOfone(int n) {
        int count=0;
        while(n!=0){
            if ((n&1)==1){
                count++;
            }
            n=n>>>1;
        }
        return count;
    }
    public static void main13(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        System.out.println(numOfone(n));
    }
//奇数位、偶数位的1
    public static void printOne(int n){
        for (int i = 30; i >= 0; i -= 2) {
            System.out.print(((n >> i) & 1) + " ");
        }
        System.out.println();
        for (int i = 31; i >= 1; i -= 2) {
            System.out.print(((n >> i) & 1) + " ");
        }
    }
    public static void main(String[] args) {
        printOne(11);
    }

    public static void print(int n) {
       while(n!=0){
           System.out.print(n%10+" ");
           n/=10;
       }
    }

    public static void main7(String[] args) {
        print(123);
    }
}




























